<%@ Page Language="C#" AutoEventWireup="true" CodeFile="add_attachment.aspx.cs" Inherits="add_attachment" %>

<!--
Copyright 2002-2011 Corey Trager
Distributed under the terms of the GNU General Public License
-->
<html>
<head>
    <title id="titl" runat="server">btnet add attachment</title>
    <link rel="StyleSheet" href="btnet.css" type="text/css" />
    <script type="text/javascript">
        function set_msg(s) {
            document.getElementById("msg").innerHTML = s
            document.getElementById("file_input").innerHTML
		= '<input type=file class=txt name="attached_file" id="attached_file" maxlength=255 size=60/>'
        }

        function waiting() {
            document.getElementById("msg").innerHTML = "Uploading..."
            return true
        }
    </script>
</head>
<body>
    <iframe name="hiddenframe" style="display: none">x</iframe>
    <div class="align">
        Add attachment to
        <% Response.Write(Convert.ToString(bugid)); %>
        <p>
            <table border="0">
                <tr>
                    <td>
                        <form id="Form1" target="hiddenframe" class="frm" runat="server" enctype="multipart/form-data"
                        onsubmit="return waiting()">
                        <table border="0">
                            <tr>
                                <td class="lbl">
                                    Description:
                                </td>
                                <td>
                                    <input runat="server" type="text" class="txt" id="desc" maxlength="80" size="80" />
                                </td>
                                <td runat="server" class="err" id="desc_err">
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td class="lbl">
                                    File:
                                </td>
                                <td>
                                    <div id="file_input">
                                        <input runat="server" type="file" class="txt" id="attached_file" maxlength="255"
                                            size="60" />
                                    </div>
                                </td>
                                <td runat="server" class="err" id="attached_file_err">
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3">
                                    <asp:CheckBox runat="server" class="cb" ID="internal_only" />
                                    <span runat="server" id="internal_only_label">Visible to internal users only</span>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3" align="left">
                                    <span runat="server" class="err" id="msg">&nbsp;</span>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" align="center">
                                    <input runat="server" class="btn" type="submit" id="sub" value="Upload" />
                                </td>
                            </tr>
                        </table>
                        </form>
                    </td>
                </tr>
            </table>
        </p>
    </div>
    <asp:Literal runat="server" ID="custom_footer_label"></asp:Literal>
</body>
</html>
